function printId(id: number | string): void {
    if (typeof id === 'string'){
        console.log(`your id is: ${id.toUpperCase()}`)
    }else{
        console.log(`your id is: ${id}`)
    }
}

function welcomePeople(x:string[]|string){
    if (Array.isArray(x)){
        console.log(`Hello Array, ${x.join(' and ')}`)
    }else{
        console.log(`Hello string, ${x}`)
    }
}
printId(12)
printId('fuck')
welcomePeople('fuck you')
welcomePeople(['fuck you', 'diaomao', 'asan'])